import { ClientOpcode } from "@runtime/generate/message/ClientOpcode";
import ApplyInteractableObjectLocationMessageHandler from "@runtime/module/Handler/Base/ApplyInteractableObjectLocationMessageHandler";
import InteractableObjectCheckedMessageHandler from "@runtime/module/Handler/Base/InteractableObjectCheckedMessageHandler";
import LabelUpdateMessageHandler from "@runtime/module/Handler/Base/LabelUpdateMessageHandler";
import LoadAllAssetProgressMessageHandler from "@runtime/module/Handler/Base/LoadAllAssetProgressMessageHandler";
import TooltipHideMessageHandler from "@runtime/module/Handler/Base/TooltipHideMessageHandler";
import TooltipShowMessageHandler from "@runtime/module/Handler/Base/TooltipShowMessageHandler";
import CalibrationUnityMessageHandler from "@runtime/module/Handler/DemarcateUnityMessageHandler";
import DeviceDataAdapterUpdateMessageHandler from "@runtime/module/Handler/DeviceDataAdapter/DeviceDataAdapterUpdateMessage";
import InertialNavigationCalibrationLabelUpdateMessageHandler from "@runtime/module/Handler/InertialNavigation/InertialNavigationCalibrationLabelUpdateMessageHandler";
import InertialNavigationProtocolDataUpdateMessageHandler from "@runtime/module/Handler/InertialNavigation/InertialNavigationProtocolDataUpdateMessageHandler";
import MaintenanceUnityMessageHandler from "@runtime/module/Handler/MaintenanceUnityMessageHandler";
import StructureAdapterUpdateMessageHandler from "@runtime/module/Handler/StructureAdapterUp/StructureAdapterUpdateMessage";
import WebSocketComponent from "@runtime/module/WebSocket/WebSocketComponent";


export default class ClientMessageHandlerLoader {
    private static instance: ClientMessageHandlerLoader = new ClientMessageHandlerLoader();
    /**
     * 请求处理加载器
     */
    public static get Default(): ClientMessageHandlerLoader {
        return this.instance;
    }

    public Load(): void {
		WebSocketComponent.Default.Register(ClientOpcode.ApplyInteractableObjectLocationMessage, new ApplyInteractableObjectLocationMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.InteractableObjectCheckedMessage, new InteractableObjectCheckedMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.LabelUpdateMessage, new LabelUpdateMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.LoadAllAssetProgressMessage, new LoadAllAssetProgressMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.TooltipHideMessage, new TooltipHideMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.TooltipShowMessage, new TooltipShowMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.InertialNavigationCalibrationLabelUpdateMessage, new InertialNavigationCalibrationLabelUpdateMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.InertialNavigationProtocolDataUpdateMessage, new InertialNavigationProtocolDataUpdateMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.DeviceDataAdapterUpdateMessage, new DeviceDataAdapterUpdateMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.StructureAdapterUpdateMessage, new StructureAdapterUpdateMessageHandler());
        WebSocketComponent.Default.Register(ClientOpcode.DisassemblyUnityMessage, new MaintenanceUnityMessageHandler());
		WebSocketComponent.Default.Register(ClientOpcode.CalibrationUnityMessage, new CalibrationUnityMessageHandler());
    }
}